<?php
namespace app\api\service\uniapp\shop;

use app\api\controller\Leshua;
use app\api\controller\Wxutils;
use app\api\model\ShopYiwu;
use app\api\model\UserStore;
use app\api\service\uniapp\order\OrderService;
use app\common\controller\Api;

class Shop extends Api
{
    protected $noNeedLogin = ['*'];
    protected $noNeedRight = ['*'];

    public function getShopByKey($key){
        $shop = UserStore::where(['store_name'=>array('like',"%".$key."%"),'is_check'=>1])->select();
        foreach ($shop as $k=>$v){
            $shop[$k]['shop_img'] = config('img_url').str_replace('/public/','',$v['store_img'][0]);
        }
        return $shop;
    }
}